home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMFS7.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  5KB  |  130 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DEMFS7.PAS
  12.               Illustrates virtual screen management using the GoldFast unit.
  13. }
  14.  
  15. program DemoFastSeven;
  16.  
  17. {$I GOLDFLAG.INC}
  18.  
  19. uses DOS,CRT, GoldMisc, GoldAttr, GoldFast, GoldKey;
  20.  
  21. procedure Pause;
  22. {}
  23. begin
  24.    GetInput;
  25. end; {Pause}
  26.  
  27. procedure Initialize;
  28. {}
  29. begin
  30.    CreateScreen(2,80,25,WhiteOnRed);
  31.    CreateScreen(3,80,25,WhiteOnBlue);
  32. end; {Initialize}
  33.  
  34. procedure IntroScreen;
  35. {}
  36. const
  37.     Tab = 8;
  38. begin
  39.    Clear(WhiteOnBlue,' '); { white,blue }
  40.    WriteCenter(1,YellowOnBlue,'TechnoJock''s Turbo Toolkit - Gold');
  41.    WriteCenter(2,YellowOnBlue,'Copyright 1993 TechnoJock Software, Inc.');
  42.    WritePlain(Tab,5,'The totFAST unit includes the object ScreenOBJ. The interface');
  43.    WritePlain(Tab,6,'section of the unit includes an instance of ScreenOBJ called');
  44.    WritePlain(Tab,7,'SCREEN. You can create other instances of ScreenOBJ and these');
  45.    WritePlain(Tab,8,'are effectively virtual screens created on the heap. At any');
  46.    WritePlain(Tab,9,'time, the visible screen can be saved to a ScreenOBJ instance,');
  47.    WritePlain(Tab,10,'or a ScreenOBJ instance can be displayed on the visible screen.');
  48.    WritePlain(Tab,12,'You can write to the visible screen with SCREEN methods, or');
  49.    WritePlain(Tab,13,'write to a virtual screen by calling the methods of any other');
  50.    WritePlain(Tab,14,'instance.');
  51.    WritePlain(Tab,16,'While you have been reading this screen, 3 other screens have');
  52.    WritePlain(Tab,17,'been created. Press any key to see these screens slide onto');
  53.    WritePlain(Tab,18,'the display.');
  54.    WriteRight(80,25,YellowOnRed,'Press any key to continue ....');
  55. end; {IntroScreen}
  56.  
  57. procedure BuildScreen2;
  58. {}
  59. const
  60.    Tab = 8; Tab1 = 10;
  61. begin
  62.    ActivateVirtualScreen(2);
  63.    WriteCenter(1,YellowOnRed,'Screen Writing');
  64.    WritePlain(Tab,5,'The ScreenOBJ object boasts a large number of screen writing');
  65.    WritePlain(Tab,6,'methods, including the following:');
  66.    WriteHi(Tab1,8,YellowOnRed,WhiteOnRed,'~Write~ writes at cursor position in default color'); { yellow,red } { white,red }
  67.    WriteHi(Tab1,9,YellowOnRed,WhiteOnRed,'~WriteHi~ writes at X,Y using highlights');
  68.    WriteHi(Tab1,10,YellowOnRed,WhiteOnRed,'~WritePlain~ writes at X,Y using existing attribute');
  69.    WriteHi(Tab1,11,YellowOnRed,WhiteOnRed,'~WriteAt~ writes at X,Y using a specified color');
  70.    WriteHi(Tab1,12,YellowOnRed,WhiteOnRed,'~WriteCap~ writes highlighting first capital letter');
  71.    WriteHi(Tab1,13,YellowOnRed,WhiteOnRed,'~WriteClick~ writes with a tactile click!');
  72.    WriteHi(Tab1,14,YellowOnRed,WhiteOnRed,'~WriteCenter~ writes text centered on screen');
  73.    WriteHi(Tab1,15,YellowOnRed,WhiteOnRed,'~WriteBetween~ writes centered between two X coords');
  74.    WriteHi(Tab1,16,YellowOnRed,WhiteOnRed,'~WriteRight~ writes right justified');
  75.    WriteHi(Tab1,17,YellowOnRed,WhiteOnRed,'~WriteVert~ writes in a vertical column ');
  76.    WritePlain(Tab,19,'Other methods provide full control of the cursor, the');
  77.    WritePlain(Tab,20,'ability to read characters from any location on a screen');
  78.    WritePlain(Tab,21,'and objects for controlling the physical display');
  79.    WritePlain(Tab,22,'attributes, e.g. set into condensed display. Press any');
  80.    WritePlain(Tab,23,'key to see the box and line drawing capabilities.');
  81.    GotoXY(57,23);
  82. end; {BuildScreen2}
  83.  
  84. procedure BuildScreen3;
  85. {}
  86. const
  87.    Tab = 8;
  88. begin
  89.    ActivateVirtualScreen(3);
  90.    WritePlain(Tab,4,'The ScreenOBJ objects includes some very easy-to-use box drawing');
  91.    WritePlain(Tab,5,'methods. Boxes can be draw as a frame or filled, and optionally');
  92.    WritePlain(Tab,6,'draw titles at the top, in a drop box, or at the bottom of the box.');
  93.    WritePlain(Tab,21,'There are also methods for drawing single and double lines');
  94.    WritePlain(Tab,22,'that automatically draw "junctions" when another line is ');
  95.    WritePlain(Tab,23,'met or crossed. Press any key to see the smart line facility.');
  96.    FBox(15,8,65,17,WhiteOnRed,2);
  97.    CursorOff;
  98. end; {BuildScreen3}
  99.  
  100.  
  101. begin
  102. {$IFOPT D+}
  103.    HeapRecord;
  104. {$ENDIF}
  105.    Initialize;
  106.    IntroScreen;
  107.    BuildScreen2;
  108.    BuildScreen3;
  109.    ActivateVisibleScreen;
  110.    Pause;
  111.    SaveScreen(1);
  112.    SlideRestoreScreen(2,horiz);
  113.    Pause;
  114.    SlideRestoreScreen(3,vert);
  115.    Pause;
  116.    SmartHorizLine(1,80,14,WhiteOnBlack,1);
  117.    SmartVertLine(35,8,19,UseTint,2);
  118.    SmartVertLine(64,10,19,UseTint,2);
  119.    WriteCenter(25,BlackOnWhite,'That''s all Folks!'); { black,white }
  120.    Pause;
  121.    DisposeScreen(1);
  122.    DisposeScreen(2);
  123.    DisposeScreen(3);
  124.    ClrScr;
  125.    CursorOn;
  126. {$IFOPT D+}
  127.    HeapCheck;
  128. {$ENDIF}
  129. end.
  130.